package thead;

public class practice3 {
    private static int count = 0;
    public static void main(String[] args) throws InterruptedException {
        for(int i = 0; i < 20;i++) {
            Thread t = new Thread(()->{
                System.out.println(count++);
            });
            t.start();
            t.join();
        }
        System.out.println("ok");
    }
}
